#coding: utf-8
import json

config = {
 	# 微信开放平台
	'openwx': {
		'appid': 'wx35d25aba349e1db8',
		'appsecret': ''
	},
	'group': [
		# group-0
		{
			"aliyun": {
				"rds": {
					"host": "rm-wz93515rco2l6xdu5.mysql.rds.aliyuncs.com",
					"account": "testar_1",
					"password": "Testar20220428"
				},
				"redis": {
					"host": "r-wz94p1cl7utvs2tboe.redis.rds.aliyuncs.com",
					"password": "testar_0:Testar20220428"
				},
				"oss": {
					"host": "testars-content.oss-cn-shenzhen.aliyuncs.com"
				},
			},
			"ssh": {
				"host": [],
				"cmd": [
					'sudo python /home/dev/publish/code/main.py 8001',
					'sudo python /home/dev/publish/code/main.py 8002',
					'sudo python /home/dev/publish/code/main.py 8003',
					'sudo python /home/dev/publish/code/main.py 8004',
				]
			}
		}
	],
	'app': {
		'app': {
			'sys': 0,
			'product': 0,
		},
		'system': {
			'sys': 0,
			'product': 0,
		},
		'debug': {
			'sys': 0,
			'product': 0,
		},
		'testar':{
			'sys': 0,
			'product': 0,
		},
		'client':{
			'sys': 0,
			'product': 0,
		},
		'lockchime':{
			'sys': 0,
			'product': 0,
		}
	}	
}

def getSysConfig():
	return config['group'][0]

def get_app_config(app):
	confs = {
		'sys': config['group'][ config['app'][app]['sys'] ],
		'product': config['group'][ config['app'][app]['product'] ],
	}
	return confs